Optimal. Leaf size=94 \[ -\frac {a (A-2 C) \tan (c+d x)}{d \sqrt {a \sec (c+d x)+a}}+\frac {A \sin (c+d x) \sqrt {a \sec (c+d x)+a}}{d}+\frac {\sqrt {a} A \tan ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a \sec (c+d x)+a}}\right )}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.20, antiderivative size = 94, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 33, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.152, Rules used = {4087, 3915, 3774, 203, 3792} \[ -\frac {a (A-2 C) \tan (c+d x)}{d \sqrt {a \sec (c+d x)+a}}+\frac {A \sin (c+d x) \sqrt {a \sec (c+d x)+a}}{d}+\frac {\sqrt {a} A \tan ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a \sec (c+d x)+a}}\right )}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 203
Rule 3774
Rule 3792
Rule 3915
Rule 4087
Rubi steps
\begin {align*} \int \cos (c+d x) \sqrt {a+a \sec (c+d x)} \left (A+C \sec ^2(c+d x)\right ) \, dx &=\frac {A \sqrt {a+a \sec (c+d x)} \sin (c+d x)}{d}+\frac {\int \sqrt {a+a \sec (c+d x)} \left (\frac {a A}{2}-\frac {1}{2} a (A-2 C) \sec (c+d x)\right ) \, dx}{a}\\ &=\frac {A \sqrt {a+a \sec (c+d x)} \sin (c+d x)}{d}+\frac {1}{2} A \int \sqrt {a+a \sec (c+d x)} \, dx+\frac {1}{2} (-A+2 C) \int \sec (c+d x) \sqrt {a+a \sec (c+d x)} \, dx\\ &=\frac {A \sqrt {a+a \sec (c+d x)} \sin (c+d x)}{d}-\frac {a (A-2 C) \tan (c+d x)}{d \sqrt {a+a \sec (c+d x)}}-\frac {(a A) \operatorname {Subst}\left (\int \frac {1}{a+x^2} \, dx,x,-\frac {a \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{d}\\ &=\frac {\sqrt {a} A \tan ^{-1}\left (\frac {\sqrt {a} \tan (c+d x)}{\sqrt {a+a \sec (c+d x)}}\right )}{d}+\frac {A \sqrt {a+a \sec (c+d x)} \sin (c+d x)}{d}-\frac {a (A-2 C) \tan (c+d x)}{d \sqrt {a+a \sec (c+d x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A] time = 0.37, size = 84, normalized size = 0.89 \[ \frac {a \tan (c+d x) \left (\sqrt {1-\sec (c+d x)} (A \cos (c+d x)+2 C)+A \tanh ^{-1}\left (\sqrt {1-\sec (c+d x)}\right )\right )}{d \sqrt {1-\sec (c+d x)} \sqrt {a (\sec (c+d x)+1)}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.48, size = 258, normalized size = 2.74 \[ \left [\frac {{\left (A \cos \left (d x + c\right ) + A\right )} \sqrt {-a} \log \left (\frac {2 \, a \cos \left (d x + c\right )^{2} - 2 \, \sqrt {-a} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right ) \sin \left (d x + c\right ) + a \cos \left (d x + c\right ) - a}{\cos \left (d x + c\right ) + 1}\right ) + 2 \, {\left (A \cos \left (d x + c\right ) + 2 \, C\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{2 \, {\left (d \cos \left (d x + c\right ) + d\right )}}, -\frac {{\left (A \cos \left (d x + c\right ) + A\right )} \sqrt {a} \arctan \left (\frac {\sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \cos \left (d x + c\right )}{\sqrt {a} \sin \left (d x + c\right )}\right ) - {\left (A \cos \left (d x + c\right ) + 2 \, C\right )} \sqrt {\frac {a \cos \left (d x + c\right ) + a}{\cos \left (d x + c\right )}} \sin \left (d x + c\right )}{d \cos \left (d x + c\right ) + d}\right ] \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 5.55, size = 362, normalized size = 3.85 \[ -\frac {\frac {4 \, \sqrt {2} \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a} C a \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )}{a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} - a} + A \sqrt {-a} \log \left ({\left | {\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{2} - a {\left (2 \, \sqrt {2} + 3\right )} \right |}\right ) \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) - A \sqrt {-a} \log \left ({\left | {\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{2} + a {\left (2 \, \sqrt {2} - 3\right )} \right |}\right ) \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) + \frac {4 \, {\left (3 \, \sqrt {2} {\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{2} A \sqrt {-a} a \mathrm {sgn}\left (\cos \left (d x + c\right )\right ) - \sqrt {2} A \sqrt {-a} a^{2} \mathrm {sgn}\left (\cos \left (d x + c\right )\right )\right )}}{{\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{4} - 6 \, {\left (\sqrt {-a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {-a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{2} a + a^{2}}}{2 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 1.80, size = 138, normalized size = 1.47 \[ -\frac {\left (A \sqrt {2}\, \arctanh \left (\frac {\sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right ) \sqrt {2}}{2 \cos \left (d x +c \right )}\right ) \sqrt {-\frac {2 \cos \left (d x +c \right )}{1+\cos \left (d x +c \right )}}\, \sin \left (d x +c \right )+2 A \left (\cos ^{2}\left (d x +c \right )\right )-2 A \cos \left (d x +c \right )+4 C \cos \left (d x +c \right )-4 C \right ) \sqrt {\frac {a \left (1+\cos \left (d x +c \right )\right )}{\cos \left (d x +c \right )}}}{2 d \sin \left (d x +c \right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [B] time = 0.62, size = 792, normalized size = 8.43 \[ \text {result too large to display} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int \cos \left (c+d\,x\right )\,\left (A+\frac {C}{{\cos \left (c+d\,x\right )}^2}\right )\,\sqrt {a+\frac {a}{\cos \left (c+d\,x\right )}} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \sqrt {a \left (\sec {\left (c + d x \right )} + 1\right )} \left (A + C \sec ^{2}{\left (c + d x \right )}\right ) \cos {\left (c + d x \right )}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________